<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=2"><meta name="theme-color" content="#FFF"><meta name="baidu-site-verification" content="code-DvHFUp3jdk"><meta name="baidu-site-verification" content="code-eHnRZZHAeP"><meta name="baidu-site-verification" content="code-EmlZBboqEW"><meta name="baidu-site-verification" content="code-Hf9ZXEHZ41"><meta name="360-site-verification" content="941073b91e9afaf02748ba000ba47e80"><meta name="360-site-verification" content="010bd45f0d523ce46f298dd597ef0289"><meta name="sogou_site_verification" content="hlLPNfmIjv"><meta name="sogou_site_verification" content="y3La2dTB20"><meta name="msvalidate.01" content="03829B28CC46A7AA4B5503897F475BA1"><script>!function(){var s="https://s.ssl.qhres2.com/ssl/ab77b6ea7f3fbf79.js";document.write('<script src="'+s+'" id="sozz"><\/script>')}()</script><script>!function(t,e,c,n,r,a,s){t[c]=t[c]||function(){(t[c].q=t[c].q||[]).push(arguments)},a=e.createElement(n),a.async=1,a.src="https://www.clarity.ms/tag/"+r+"?ref=bwt",s=e.getElementsByTagName(n)[0],s.parentNode.insertBefore(a,s)}(window,document,"clarity","script","8xwpfccwj2")</script><script>var _hmt=_hmt||[];!function(){var e=document.createElement("script");e.src="https://hm.baidu.com/hm.js?1d318b0509ca0909017253ed6f659ae4";var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)}()</script><script>var _hmt=_hmt||[];!function(){var e=document.createElement("script");e.src="https://hm.baidu.com/hm.js?aea6c1471d6299bdd1c87a0836f18675";var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)}()</script><script>var _hmt=_hmt||[];!function(){var e=document.createElement("script");e.src="https://hm.baidu.com/hm.js?498ca413655655a62058d6b5d7c62786";var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)}()</script><script>var _hmt=_hmt||[];!function(){var e=document.createElement("script");e.src="https://hm.baidu.com/hm.js?e19e8161e13f718806b79f49240583b4";var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)}()</script><link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon.png"><link rel="icon" type="image/ico" sizes="32x32" href="/images/favicon.ico"><meta http-equiv="Cache-Control" content="no-transform"><meta http-equiv="Cache-Control" content="no-siteapp"><meta name="google-site-verification" content="UA-139249935-1"><meta name="baidu-site-verification" content="cOtBu9CtTEIuwJeN"><link rel="alternate" type="application/rss+xml" title="了尘兰若的小坑" href="https://liaochenlanruo.gitee.io/rss.xml"><link rel="alternate" type="application/atom+xml" title="了尘兰若的小坑" href="https://liaochenlanruo.gitee.io/atom.xml"><link rel="alternate" type="application/json" title="了尘兰若的小坑" href="https://liaochenlanruo.gitee.io/feed.json"><link rel="stylesheet" href="//fonts.googleapis.com/css?family=Mulish:300,300italic,400,400italic,700,700italic%7CFredericka%20the%20Great:300,300italic,400,400italic,700,700italic%7CNoto%20Serif%20JP:300,300italic,400,400italic,700,700italic%7CNoto%20Serif%20SC:300,300italic,400,400italic,700,700italic%7CInconsolata:300,300italic,400,400italic,700,700italic&display=swap&subset=latin,latin-ext"><link rel="stylesheet" href="/css/app.css?v=0.2.5"><meta name="keywords" content="扩增子"><link rel="canonical" href="https://liaochenlanruo.gitee.io/post/1755.html"><title>扩增子分析--计算随机过程和决定性过程比例 - 生物信息 | ResearchGo = 了尘兰若的小坑 = liaochenlanruo</title><meta name="generator" content="Hexo 5.4.0"></head><body itemscope itemtype="http://schema.org/WebPage"><div id="loading"><div class="cat"><div class="body"></div><div class="head"><div class="face"></div></div><div class="foot"><div class="tummy-end"></div><div class="bottom"></div><div class="legs left"></div><div class="legs right"></div></div><div class="paw"><div class="hands left"></div><div class="hands right"></div></div></div></div><div id="container"><header id="header" itemscope itemtype="http://schema.org/WPHeader"><div class="inner"><div id="brand"><div class="pjax"><h1 itemprop="name headline">扩增子分析--计算随机过程和决定性过程比例</h1><div class="meta"><span class="item" title="Created: 2021-03-25 16:42:06"><span class="icon"><i class="ic i-calendar"></i> </span><span class="text">Posted on</span> <time itemprop="dateCreated datePublished" datetime="2021-03-25T16:42:06+08:00">2021-03-25</time> </span><span class="item" title="Symbols count in article"><span class="icon"><i class="ic i-pen"></i> </span><span class="text">Symbols count in article</span> <span>7.2k</span> <span class="text">words</span> </span><span class="item" title="Reading time"><span class="icon"><i class="ic i-clock"></i> </span><span class="text">Reading time</span> <span>7 mins.</span></span></div></div></div><nav id="nav"><div class="inner"><div class="toggle"><div class="lines" aria-label="Toggle navigation bar"><span class="line"></span> <span class="line"></span> <span class="line"></span></div></div><ul class="menu"><li class="item title"><a href="/" rel="start">ResearchGo</a></li></ul><ul class="right"><li class="item theme"><i class="ic i-sun"></i></li><li class="item search"><i class="ic i-search"></i></li></ul></div></nav></div><div id="imgs" class="pjax"><img src="https://fastly.jsdelivr.net/gh/liaochenlanruo/cdn@master/img/custom/bgs/thumb_53.webp"></div></header><div id="waves"><svg class="waves" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 24 150 28" preserveAspectRatio="none" shape-rendering="auto"><defs><path id="gentle-wave" d="M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z"/></defs><g class="parallax"><use xlink:href="#gentle-wave" x="48" y="0"/><use xlink:href="#gentle-wave" x="48" y="3"/><use xlink:href="#gentle-wave" x="48" y="5"/><use xlink:href="#gentle-wave" x="48" y="7"/></g></svg></div><main><div class="inner"><div id="main" class="pjax"><div class="article wrap"><div class="breadcrumb" itemscope itemtype="https://schema.org/BreadcrumbList"><i class="ic i-home"></i> <span><a href="/">Home</a></span><i class="ic i-angle-right"></i> <span class="current" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"><a href="/categories/Bioinformatics/" itemprop="item" rel="index" title="In 生物信息"><span itemprop="name">生物信息</span></a><meta itemprop="position" content="1"></span></div><article itemscope itemtype="http://schema.org/Article" class="post block" lang="en"><link itemprop="mainEntityOfPage" href="https://liaochenlanruo.gitee.io/post/1755.html"><span hidden itemprop="author" itemscope itemtype="http://schema.org/Person"><meta itemprop="image" content="/images/head.jpg"><meta itemprop="name" content="Hualin Liu"><meta itemprop="description" content="liaochenlanruo, 分享微生物生物信息学分析方法，欢迎加入QQ群交流945751012，不接受群内广告！"></span><span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization"><meta itemprop="name" content="了尘兰若的小坑"></span><div class="body md" itemprop="articleBody"><div class="gallery" itemscope itemtype="http://schema.org/ImageGallery"><img data-src="https://fastly.jsdelivr.net/gh/liaochenlanruo/cdn@master/img/custom/bgs/thumb_53.webp" itemprop="contentUrl"></div><p>确定性过程（deterministic processes）和随机性过程（stochastic processes) 是两个影响微生物群落结构系统发育组装的重要过程，本文介绍计算二者所占比例的方法。</p><span id="more"></span><h1 id="font-colorff0000-1-软件font"><a class="anchor" href="#font-colorff0000-1-软件font">#</a> <font color="#FF0000">1. 软件</font></h1><ul><li>NST</li><li>iCAMP</li><li>ape 用于读取进化树文件</li><li>picante</li></ul><h1 id="font-colorff0000-2-文件准备font"><a class="anchor" href="#font-colorff0000-2-文件准备font">#</a> <font color="#FF0000">2. 文件准备</font></h1><h2 id="font-colorff0000-21-feature-tablefont"><a class="anchor" href="#font-colorff0000-21-feature-tablefont">#</a> <font color="#FF0000">2.1 Feature Table</font></h2><p>行为 OTUs/ASVs，列为样本。</p><table><thead><tr><th>TaxonID</th><th>Sample 1</th><th>Sample 2</th><th>Sample 3</th><th>Sample 4</th></tr></thead><tbody><tr><td>OTU1</td><td>232.0</td><td>209.0</td><td>349.0</td><td>256.0</td></tr><tr><td>OTU2</td><td>75.0</td><td>35.0</td><td>44.0</td><td>0.0</td></tr><tr><td>OTU3</td><td>237.0</td><td>224.0</td><td>291.0</td><td>353.0</td></tr><tr><td>OTU4</td><td>371.0</td><td>80.0</td><td>319.0</td><td>345.0</td></tr></tbody></table><h2 id="font-colorff0000-22-group-filefont"><a class="anchor" href="#font-colorff0000-22-group-filefont">#</a> <font color="#FF0000">2.2 Group File</font></h2><p>该文件描述了所有样本的分组情况，如实验组和对照组，或者其他分组。</p><table><thead><tr><th>Sample_ID</th><th>Group</th></tr></thead><tbody><tr><td>Sample 1</td><td>Group x</td></tr><tr><td>Sample 2</td><td>Group x</td></tr><tr><td>Sample 3</td><td>Group y</td></tr><tr><td>Sample 4</td><td>Group y</td></tr><tr><td>...</td><td>...</td></tr></tbody></table><h2 id="font-colorff0000-23-tree-filefont"><a class="anchor" href="#font-colorff0000-23-tree-filefont">#</a> <font color="#FF0000">2.3 Tree File</font></h2><p>包含 Feature table 中所有 OTUs/ASVs 的系统发育树文件，理想条件下仅包含 Feature table 中的 OTUs/ASVs，不过大部分情况下还会包含数据库中的一些物种，在随后的分析中需要去除多余的物种（后续会讲到）。</p><h1 id="font-colorff0000-3-开始分析font"><a class="anchor" href="#font-colorff0000-3-开始分析font">#</a> <font color="#FF0000">3. 开始分析</font></h1><figure class="highlight r"><figcaption data-lang="r"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token comment">########################</span></pre></td></tr><tr><td data-num="2"></td><td><pre><span class="token comment">#!/usr/bin/env R</span></pre></td></tr><tr><td data-num="3"></td><td><pre><span class="token comment"># version 20200919</span></pre></td></tr><tr><td data-num="4"></td><td><pre><span class="token comment"># Step 1. 文件、路径和参数</span></pre></td></tr><tr><td data-num="5"></td><td><pre></pre></td></tr><tr><td data-num="6"></td><td><pre><span class="token comment"># 指定包含输入文件的目录路径，注意区分 Windows 和 Linux 的路径写法</span></pre></td></tr><tr><td data-num="7"></td><td><pre>wd<span class="token operator">=</span><span class="token string">"/mnt/e/Researches/lujia16S/Analysis_20200907/exported-feature-table_2k_abund22/Raup_Crick"</span></pre></td></tr><tr><td data-num="8"></td><td><pre></pre></td></tr><tr><td data-num="9"></td><td><pre><span class="token comment"># 指定结果文件的保存路径</span></pre></td></tr><tr><td data-num="10"></td><td><pre>save.wd<span class="token operator">=</span><span class="token string">"/mnt/e/Researches/lujia16S/Analysis_20200907/exported-feature-table_2k_abund22/Raup_Crick/Result2"</span></pre></td></tr><tr><td data-num="11"></td><td><pre></pre></td></tr><tr><td data-num="12"></td><td><pre><span class="token comment"># 创建文件保存路径</span></pre></td></tr><tr><td data-num="13"></td><td><pre>dir.create<span class="token punctuation">(</span>save.wd<span class="token punctuation">,</span> recursive <span class="token operator">=</span> <span class="token boolean">TRUE</span><span class="token punctuation">)</span></pre></td></tr><tr><td data-num="14"></td><td><pre></pre></td></tr><tr><td data-num="15"></td><td><pre><span class="token comment"># 指定 Feature table（OTU 表）的文件名</span></pre></td></tr><tr><td data-num="16"></td><td><pre>com.file<span class="token operator">=</span><span class="token string">"feature-table.tsv"</span></pre></td></tr><tr><td data-num="17"></td><td><pre></pre></td></tr><tr><td data-num="18"></td><td><pre><span class="token comment"># 指定样本分组文件，每行为一个样本</span></pre></td></tr><tr><td data-num="19"></td><td><pre>group.file<span class="token operator">=</span><span class="token string">"treatment.txt"</span></pre></td></tr><tr><td data-num="20"></td><td><pre></pre></td></tr><tr><td data-num="21"></td><td><pre><span class="token comment"># 指定 NWK 格式的系统发育树文件</span></pre></td></tr><tr><td data-num="22"></td><td><pre>tree.file<span class="token operator">=</span><span class="token string">"tree.nwk"</span></pre></td></tr><tr><td data-num="23"></td><td><pre></pre></td></tr><tr><td data-num="24"></td><td><pre><span class="token comment"># 设置并行运算使用的线程数</span></pre></td></tr><tr><td data-num="25"></td><td><pre>nworker<span class="token operator">=</span><span class="token number">8</span></pre></td></tr><tr><td data-num="26"></td><td><pre></pre></td></tr><tr><td data-num="27"></td><td><pre><span class="token comment"># randomization time for null model analysis. 真实分析的时候一般设置为 1000，如果测试的话可以设 20</span></pre></td></tr><tr><td data-num="28"></td><td><pre>rand.time<span class="token operator">=</span><span class="token number">999</span></pre></td></tr><tr><td data-num="29"></td><td><pre></pre></td></tr><tr><td data-num="30"></td><td><pre><span class="token comment"># 输出文件的前缀名，随便设置</span></pre></td></tr><tr><td data-num="31"></td><td><pre>prefix<span class="token operator">=</span><span class="token string">"Lujia"</span></pre></td></tr><tr><td data-num="32"></td><td><pre></pre></td></tr><tr><td data-num="33"></td><td><pre><span class="token comment"># Step 2. 加载 R 包</span></pre></td></tr><tr><td data-num="34"></td><td><pre></pre></td></tr><tr><td data-num="35"></td><td><pre><span class="token comment"># 确保已经安装过所需的 R 包</span></pre></td></tr><tr><td data-num="36"></td><td><pre><span class="token comment">#install.packages("NST") </span></pre></td></tr><tr><td data-num="37"></td><td><pre></pre></td></tr><tr><td data-num="38"></td><td><pre>library<span class="token punctuation">(</span>ape<span class="token punctuation">)</span></pre></td></tr><tr><td data-num="39"></td><td><pre>library<span class="token punctuation">(</span>iCAMP<span class="token punctuation">)</span></pre></td></tr><tr><td data-num="40"></td><td><pre>library<span class="token punctuation">(</span>NST<span class="token punctuation">)</span> <span class="token comment"># need to be NST >=3.0.3</span></pre></td></tr><tr><td data-num="41"></td><td><pre>library<span class="token punctuation">(</span>picante<span class="token punctuation">)</span></pre></td></tr><tr><td data-num="42"></td><td><pre></pre></td></tr><tr><td data-num="43"></td><td><pre><span class="token comment"># Step 3. 加载数据并匹配 IDs</span></pre></td></tr><tr><td data-num="44"></td><td><pre></pre></td></tr><tr><td data-num="45"></td><td><pre>setwd<span class="token punctuation">(</span>wd<span class="token punctuation">)</span></pre></td></tr><tr><td data-num="46"></td><td><pre></pre></td></tr><tr><td data-num="47"></td><td><pre><span class="token comment"># 读入 Feature Table，注意自己文件的列与列之间的分隔符是什么，制表符用 sep = "\t"，逗号用 sep = ","</span></pre></td></tr><tr><td data-num="48"></td><td><pre>comm<span class="token operator">=</span>t<span class="token punctuation">(</span>read.table<span class="token punctuation">(</span>com.file<span class="token punctuation">,</span>header <span class="token operator">=</span> <span class="token boolean">TRUE</span><span class="token punctuation">,</span> sep <span class="token operator">=</span> <span class="token string">"\t"</span><span class="token punctuation">,</span> row.names <span class="token operator">=</span> <span class="token number">1</span><span class="token punctuation">,</span> as.is <span class="token operator">=</span> <span class="token boolean">TRUE</span><span class="token punctuation">,</span> stringsAsFactors <span class="token operator">=</span> <span class="token boolean">FALSE</span><span class="token punctuation">)</span><span class="token punctuation">)</span></pre></td></tr><tr><td data-num="49"></td><td><pre></pre></td></tr><tr><td data-num="50"></td><td><pre><span class="token comment"># 读入分组文件，同样注意设置分隔符</span></pre></td></tr><tr><td data-num="51"></td><td><pre>group<span class="token operator">=</span>read.table<span class="token punctuation">(</span>group.file<span class="token punctuation">,</span> header <span class="token operator">=</span> <span class="token boolean">TRUE</span><span class="token punctuation">,</span> sep <span class="token operator">=</span> <span class="token string">"\t"</span><span class="token punctuation">,</span> row.names <span class="token operator">=</span> <span class="token number">1</span><span class="token punctuation">,</span> as.is <span class="token operator">=</span> <span class="token boolean">TRUE</span><span class="token punctuation">,</span> stringsAsFactors <span class="token operator">=</span> <span class="token boolean">FALSE</span><span class="token punctuation">)</span></pre></td></tr><tr><td data-num="52"></td><td><pre></pre></td></tr><tr><td data-num="53"></td><td><pre><span class="token comment">#如果 tree 中的 OTUs 和 Feature Table 中的 OTUs 一一对应，可以直接用下面一个命令读入 tree（注意去掉 ###），否则的话则运行下面 LHL 加入的 3 行命令</span></pre></td></tr><tr><td data-num="54"></td><td><pre><span class="token comment">###tree=ape::read.tree(file = tree.file) # if you have tree</span></pre></td></tr><tr><td data-num="55"></td><td><pre></pre></td></tr><tr><td data-num="56"></td><td><pre><span class="token comment"># 以下 3 行是 LHL 加入的</span></pre></td></tr><tr><td data-num="57"></td><td><pre>phy<span class="token operator">&lt;-</span>read.tree<span class="token punctuation">(</span>tree.file<span class="token punctuation">)</span><span class="token comment"># 读入树文件</span></pre></td></tr><tr><td data-num="58"></td><td><pre>prune_tree<span class="token operator">&lt;-</span>prune.sample<span class="token punctuation">(</span>comm<span class="token punctuation">,</span>phy<span class="token punctuation">)</span><span class="token comment"># 使树文件和 OTU 表文件一一对齐</span></pre></td></tr><tr><td data-num="59"></td><td><pre>tree<span class="token operator">=</span>prune_tree <span class="token comment"># 此刻的 Tree 干净了，可用于后续分析而不会报错</span></pre></td></tr><tr><td data-num="60"></td><td><pre></pre></td></tr><tr><td data-num="61"></td><td><pre><span class="token comment"># 以下命令检测 Feature Table 中的样本名称是否与分组文件中的样本名一一对应</span></pre></td></tr><tr><td data-num="62"></td><td><pre>samp.ck<span class="token operator">=</span>NST<span class="token operator">::</span>match.name<span class="token punctuation">(</span>rn.list<span class="token operator">=</span>list<span class="token punctuation">(</span>comm<span class="token operator">=</span>comm<span class="token punctuation">,</span>group<span class="token operator">=</span>group<span class="token punctuation">)</span><span class="token punctuation">)</span></pre></td></tr><tr><td data-num="63"></td><td><pre>comm<span class="token operator">=</span>samp.ck<span class="token operator">$</span>comm</pre></td></tr><tr><td data-num="64"></td><td><pre>comm<span class="token operator">=</span>comm<span class="token punctuation">[</span><span class="token punctuation">,</span>colSums<span class="token punctuation">(</span>comm<span class="token punctuation">)</span><span class="token operator">></span><span class="token number">0</span><span class="token punctuation">,</span>drop<span class="token operator">=</span><span class="token boolean">FALSE</span><span class="token punctuation">]</span></pre></td></tr><tr><td data-num="65"></td><td><pre>group<span class="token operator">=</span>samp.ck<span class="token operator">$</span>group</pre></td></tr><tr><td data-num="66"></td><td><pre></pre></td></tr><tr><td data-num="67"></td><td><pre><span class="token comment"># 以下命令检测 Feature Table 中的 OTUs 名称是否与 Tree 中的 OTUs 名一一对应</span></pre></td></tr><tr><td data-num="68"></td><td><pre>tax.ck<span class="token operator">=</span>NST<span class="token operator">::</span>match.name<span class="token punctuation">(</span>cn.list <span class="token operator">=</span> list<span class="token punctuation">(</span>comm<span class="token operator">=</span>comm<span class="token punctuation">)</span><span class="token punctuation">,</span>tree.list <span class="token operator">=</span> list<span class="token punctuation">(</span>tree<span class="token operator">=</span>tree<span class="token punctuation">)</span><span class="token punctuation">)</span> <span class="token comment"># if you have tree</span></pre></td></tr><tr><td data-num="69"></td><td><pre>comm<span class="token operator">=</span>tax.ck<span class="token operator">$</span>comm</pre></td></tr><tr><td data-num="70"></td><td><pre>tree<span class="token operator">=</span>tax.ck<span class="token operator">$</span>tree</pre></td></tr><tr><td data-num="71"></td><td><pre></pre></td></tr><tr><td data-num="72"></td><td><pre><span class="token comment"># Step 4. Grouping way and metacommunity seting</span></pre></td></tr><tr><td data-num="73"></td><td><pre></pre></td></tr><tr><td data-num="74"></td><td><pre><span class="token comment"># 选择分组，如果拥有多种分组方式，每次运行时选择其中的一组。此处选择的时分组文件中的第二列</span></pre></td></tr><tr><td data-num="75"></td><td><pre>groupi<span class="token operator">=</span>group<span class="token punctuation">[</span><span class="token punctuation">,</span><span class="token number">1</span><span class="token punctuation">,</span>drop<span class="token operator">=</span><span class="token boolean">FALSE</span><span class="token punctuation">]</span></pre></td></tr><tr><td data-num="76"></td><td><pre></pre></td></tr><tr><td data-num="77"></td><td><pre><span class="token comment"># 重新定义输出文件的前缀，以分组的名称来命名，此处以分组文件第二列的表头 “Group” 为前缀</span></pre></td></tr><tr><td data-num="78"></td><td><pre>prefixi<span class="token operator">=</span>paste0<span class="token punctuation">(</span>prefix<span class="token punctuation">,</span><span class="token string">".Group"</span><span class="token punctuation">)</span></pre></td></tr><tr><td data-num="79"></td><td><pre></pre></td></tr><tr><td data-num="80"></td><td><pre><span class="token comment"># if treatment and control are from different metacommunities, you may set meta.groupi=groupi，默认为 NULL</span></pre></td></tr><tr><td data-num="81"></td><td><pre><span class="token comment">#meta.groupi=NULL</span></pre></td></tr><tr><td data-num="82"></td><td><pre>meta.groupi<span class="token operator">=</span>groupi</pre></td></tr><tr><td data-num="83"></td><td><pre></pre></td></tr><tr><td data-num="84"></td><td><pre><span class="token comment"># Step 5. taxonomic NST</span></pre></td></tr><tr><td data-num="85"></td><td><pre><span class="token comment"># Step 5.1 calculate tNST</span></pre></td></tr><tr><td data-num="86"></td><td><pre></pre></td></tr><tr><td data-num="87"></td><td><pre><span class="token comment"># 指定计算距离矩阵的方法，"jaccard" and "bray" are preferred.</span></pre></td></tr><tr><td data-num="88"></td><td><pre>dist.method<span class="token operator">=</span><span class="token string">"bray"</span></pre></td></tr><tr><td data-num="89"></td><td><pre></pre></td></tr><tr><td data-num="90"></td><td><pre><span class="token comment"># 记录运行时间</span></pre></td></tr><tr><td data-num="91"></td><td><pre>t1<span class="token operator">=</span>Sys.time<span class="token punctuation">(</span><span class="token punctuation">)</span></pre></td></tr><tr><td data-num="92"></td><td><pre></pre></td></tr><tr><td data-num="93"></td><td><pre><span class="token comment"># 进入输出目录</span></pre></td></tr><tr><td data-num="94"></td><td><pre>setwd<span class="token punctuation">(</span>save.wd<span class="token punctuation">)</span></pre></td></tr><tr><td data-num="95"></td><td><pre></pre></td></tr><tr><td data-num="96"></td><td><pre><span class="token comment"># 计算 tNST</span></pre></td></tr><tr><td data-num="97"></td><td><pre>tnst<span class="token operator">=</span>tNST<span class="token punctuation">(</span>comm<span class="token operator">=</span>comm<span class="token punctuation">,</span> group<span class="token operator">=</span>groupi<span class="token punctuation">,</span> meta.group<span class="token operator">=</span>meta.groupi<span class="token punctuation">,</span> meta.com<span class="token operator">=</span><span class="token keyword">NULL</span><span class="token punctuation">,</span> dist.method<span class="token operator">=</span>dist.method<span class="token punctuation">,</span> abundance.weighted<span class="token operator">=</span><span class="token boolean">TRUE</span><span class="token punctuation">,</span> rand<span class="token operator">=</span>rand.time<span class="token punctuation">,</span> output.rand<span class="token operator">=</span><span class="token boolean">TRUE</span><span class="token punctuation">,</span> nworker<span class="token operator">=</span>nworker<span class="token punctuation">,</span> LB<span class="token operator">=</span><span class="token boolean">FALSE</span><span class="token punctuation">,</span> null.model<span class="token operator">=</span><span class="token string">"PF"</span><span class="token punctuation">,</span> between.group<span class="token operator">=</span><span class="token boolean">TRUE</span><span class="token punctuation">,</span> SES<span class="token operator">=</span><span class="token boolean">TRUE</span><span class="token punctuation">,</span> RC<span class="token operator">=</span><span class="token boolean">TRUE</span><span class="token punctuation">)</span></pre></td></tr><tr><td data-num="98"></td><td><pre></pre></td></tr><tr><td data-num="99"></td><td><pre><span class="token comment"># 以 R data 格式保存 tNST 的输出 </span></pre></td></tr><tr><td data-num="100"></td><td><pre>save<span class="token punctuation">(</span>tnst<span class="token punctuation">,</span> file <span class="token operator">=</span> paste0<span class="token punctuation">(</span>prefixi<span class="token punctuation">,</span> <span class="token string">".tNST.rda"</span><span class="token punctuation">)</span><span class="token punctuation">)</span></pre></td></tr><tr><td data-num="101"></td><td><pre></pre></td></tr><tr><td data-num="102"></td><td><pre><span class="token comment"># 保存其他 tNST 结果到多个文件中</span></pre></td></tr><tr><td data-num="103"></td><td><pre>write.table<span class="token punctuation">(</span>tnst<span class="token operator">$</span>index.grp<span class="token punctuation">,</span> file <span class="token operator">=</span> paste0<span class="token punctuation">(</span>prefixi<span class="token punctuation">,</span> <span class="token string">".tNST.summary.csv"</span><span class="token punctuation">)</span><span class="token punctuation">,</span> quote <span class="token operator">=</span> <span class="token boolean">FALSE</span><span class="token punctuation">,</span> sep <span class="token operator">=</span> <span class="token string">"\t"</span><span class="token punctuation">)</span></pre></td></tr><tr><td data-num="104"></td><td><pre></pre></td></tr><tr><td data-num="105"></td><td><pre>write.table<span class="token punctuation">(</span>tnst<span class="token operator">$</span>index.pair.grp<span class="token punctuation">,</span>file <span class="token operator">=</span> paste0<span class="token punctuation">(</span>prefixi<span class="token punctuation">,</span><span class="token string">".tNST.pairwise.csv"</span><span class="token punctuation">)</span><span class="token punctuation">,</span>quote <span class="token operator">=</span> <span class="token boolean">FALSE</span><span class="token punctuation">,</span>sep <span class="token operator">=</span> <span class="token string">"\t"</span><span class="token punctuation">)</span></pre></td></tr><tr><td data-num="106"></td><td><pre></pre></td></tr><tr><td data-num="107"></td><td><pre>write.table<span class="token punctuation">(</span>tnst<span class="token operator">$</span>index.pair<span class="token punctuation">,</span>file <span class="token operator">=</span> paste0<span class="token punctuation">(</span>prefixi<span class="token punctuation">,</span><span class="token string">".tNST.pairwise.index.csv"</span><span class="token punctuation">)</span><span class="token punctuation">,</span>quote <span class="token operator">=</span> <span class="token boolean">FALSE</span><span class="token punctuation">,</span>sep <span class="token operator">=</span> <span class="token string">"\t"</span><span class="token punctuation">)</span></pre></td></tr><tr><td data-num="108"></td><td><pre>write.table<span class="token punctuation">(</span>tnst<span class="token operator">$</span>index.between<span class="token punctuation">,</span>file <span class="token operator">=</span> paste0<span class="token punctuation">(</span>prefixi<span class="token punctuation">,</span><span class="token string">".tNST.between.summary.csv"</span><span class="token punctuation">)</span><span class="token punctuation">,</span>quote <span class="token operator">=</span> <span class="token boolean">FALSE</span><span class="token punctuation">,</span>sep <span class="token operator">=</span> <span class="token string">"\t"</span><span class="token punctuation">)</span></pre></td></tr><tr><td data-num="109"></td><td><pre></pre></td></tr><tr><td data-num="110"></td><td><pre>write.table<span class="token punctuation">(</span>tnst<span class="token operator">$</span>index.pair.between<span class="token punctuation">,</span>file <span class="token operator">=</span> paste0<span class="token punctuation">(</span>prefixi<span class="token punctuation">,</span><span class="token string">".tNST.pairwise.between.csv"</span><span class="token punctuation">)</span><span class="token punctuation">,</span>quote <span class="token operator">=</span> <span class="token boolean">FALSE</span><span class="token punctuation">,</span>sep <span class="token operator">=</span> <span class="token string">"\t"</span><span class="token punctuation">)</span></pre></td></tr><tr><td data-num="111"></td><td><pre></pre></td></tr><tr><td data-num="112"></td><td><pre>format<span class="token punctuation">(</span>Sys.time<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator">-</span>t1<span class="token punctuation">)</span></pre></td></tr><tr><td data-num="113"></td><td><pre></pre></td></tr><tr><td data-num="114"></td><td><pre><span class="token comment"># Step 5.2 Bootstrapping test</span></pre></td></tr><tr><td data-num="115"></td><td><pre></pre></td></tr><tr><td data-num="116"></td><td><pre>t1<span class="token operator">=</span>Sys.time<span class="token punctuation">(</span><span class="token punctuation">)</span></pre></td></tr><tr><td data-num="117"></td><td><pre></pre></td></tr><tr><td data-num="118"></td><td><pre><span class="token comment"># 计算 Bootstrapping</span></pre></td></tr><tr><td data-num="119"></td><td><pre>tnstbt<span class="token operator">=</span>nst.boot<span class="token punctuation">(</span>nst.result<span class="token operator">=</span>tnst<span class="token punctuation">,</span> group<span class="token operator">=</span>groupi<span class="token punctuation">,</span> rand<span class="token operator">=</span>rand.time<span class="token punctuation">,</span> trace<span class="token operator">=</span><span class="token boolean">TRUE</span><span class="token punctuation">,</span> two.tail<span class="token operator">=</span><span class="token boolean">FALSE</span><span class="token punctuation">,</span> out.detail<span class="token operator">=</span><span class="token boolean">TRUE</span><span class="token punctuation">,</span> between.group<span class="token operator">=</span><span class="token boolean">FALSE</span><span class="token punctuation">,</span> nworker<span class="token operator">=</span>nworker<span class="token punctuation">)</span></pre></td></tr><tr><td data-num="120"></td><td><pre></pre></td></tr><tr><td data-num="121"></td><td><pre><span class="token comment"># 保存结果</span></pre></td></tr><tr><td data-num="122"></td><td><pre>save<span class="token punctuation">(</span>tnstbt<span class="token punctuation">,</span>file <span class="token operator">=</span> paste0<span class="token punctuation">(</span>prefixi<span class="token punctuation">,</span><span class="token string">".tNST.boot.rda"</span><span class="token punctuation">)</span><span class="token punctuation">)</span></pre></td></tr><tr><td data-num="123"></td><td><pre></pre></td></tr><tr><td data-num="124"></td><td><pre><span class="token comment"># 保存结果</span></pre></td></tr><tr><td data-num="125"></td><td><pre>write.table<span class="token punctuation">(</span>tnstbt<span class="token operator">$</span>summary<span class="token punctuation">,</span>file <span class="token operator">=</span> paste0<span class="token punctuation">(</span>prefixi<span class="token punctuation">,</span><span class="token string">".tNST.boot.summary.csv"</span><span class="token punctuation">)</span><span class="token punctuation">,</span> quote <span class="token operator">=</span> <span class="token boolean">FALSE</span><span class="token punctuation">,</span>sep <span class="token operator">=</span> <span class="token string">"\t"</span><span class="token punctuation">)</span></pre></td></tr><tr><td data-num="126"></td><td><pre>write.table<span class="token punctuation">(</span>tnstbt<span class="token operator">$</span>compare<span class="token punctuation">,</span>file <span class="token operator">=</span> paste0<span class="token punctuation">(</span>prefixi<span class="token punctuation">,</span><span class="token string">".tNST.boot.compare.csv"</span><span class="token punctuation">)</span><span class="token punctuation">,</span> quote <span class="token operator">=</span> <span class="token boolean">FALSE</span><span class="token punctuation">,</span>sep <span class="token operator">=</span> <span class="token string">"\t"</span><span class="token punctuation">)</span></pre></td></tr><tr><td data-num="127"></td><td><pre><span class="token punctuation">(</span>t<span class="token operator">=</span>format<span class="token punctuation">(</span>Sys.time<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator">-</span>t1<span class="token punctuation">)</span><span class="token punctuation">)</span></pre></td></tr><tr><td data-num="128"></td><td><pre></pre></td></tr><tr><td data-num="129"></td><td><pre><span class="token comment"># Step 5.3 PERMANOVA</span></pre></td></tr><tr><td data-num="130"></td><td><pre></pre></td></tr><tr><td data-num="131"></td><td><pre>t1<span class="token operator">=</span>Sys.time<span class="token punctuation">(</span><span class="token punctuation">)</span></pre></td></tr><tr><td data-num="132"></td><td><pre></pre></td></tr><tr><td data-num="133"></td><td><pre>tnstpaov<span class="token operator">=</span>nst.panova<span class="token punctuation">(</span>nst.result<span class="token operator">=</span>tnst<span class="token punctuation">,</span> group <span class="token operator">=</span> groupi<span class="token punctuation">,</span> rand <span class="token operator">=</span> rand.time<span class="token punctuation">,</span> trace <span class="token operator">=</span> <span class="token boolean">TRUE</span><span class="token punctuation">)</span></pre></td></tr><tr><td data-num="134"></td><td><pre></pre></td></tr><tr><td data-num="135"></td><td><pre>write.table<span class="token punctuation">(</span>tnstpaov<span class="token punctuation">,</span>file <span class="token operator">=</span> paste0<span class="token punctuation">(</span>prefixi<span class="token punctuation">,</span><span class="token string">".tNST.PERMANOVA.csv"</span><span class="token punctuation">)</span><span class="token punctuation">,</span> quote <span class="token operator">=</span> <span class="token boolean">FALSE</span><span class="token punctuation">,</span>sep <span class="token operator">=</span> <span class="token string">"\t"</span><span class="token punctuation">)</span></pre></td></tr><tr><td data-num="136"></td><td><pre></pre></td></tr><tr><td data-num="137"></td><td><pre><span class="token punctuation">(</span>t<span class="token operator">=</span>format<span class="token punctuation">(</span>Sys.time<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator">-</span>t1<span class="token punctuation">)</span><span class="token punctuation">)</span></pre></td></tr><tr><td data-num="138"></td><td><pre></pre></td></tr><tr><td data-num="139"></td><td><pre><span class="token comment"># Steo 6. phylogenetic NST</span></pre></td></tr><tr><td data-num="140"></td><td><pre></pre></td></tr><tr><td data-num="141"></td><td><pre><span class="token comment"># Step 6.1 phylogentic distance matrix # use bigmemory for big dataset</span></pre></td></tr><tr><td data-num="142"></td><td><pre></pre></td></tr><tr><td data-num="143"></td><td><pre>wd.pd<span class="token operator">=</span>paste0<span class="token punctuation">(</span>save.wd<span class="token punctuation">,</span><span class="token string">"/pdbig"</span><span class="token punctuation">)</span></pre></td></tr><tr><td data-num="144"></td><td><pre></pre></td></tr><tr><td data-num="145"></td><td><pre><span class="token keyword">if</span><span class="token punctuation">(</span><span class="token operator">!</span>dir.exists<span class="token punctuation">(</span>wd.pd<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">&#123;</span>dir.create<span class="token punctuation">(</span>wd.pd<span class="token punctuation">)</span><span class="token punctuation">&#125;</span></pre></td></tr><tr><td data-num="146"></td><td><pre></pre></td></tr><tr><td data-num="147"></td><td><pre>setwd<span class="token punctuation">(</span>wd.pd<span class="token punctuation">)</span></pre></td></tr><tr><td data-num="148"></td><td><pre></pre></td></tr><tr><td data-num="149"></td><td><pre><span class="token keyword">if</span><span class="token punctuation">(</span>file.exists<span class="token punctuation">(</span><span class="token string">"pd.desc"</span><span class="token punctuation">)</span><span class="token punctuation">)</span></pre></td></tr><tr><td data-num="150"></td><td><pre><span class="token punctuation">&#123;</span></pre></td></tr><tr><td data-num="151"></td><td><pre>  <span class="token comment"># if already done before, directly use it.</span></pre></td></tr><tr><td data-num="152"></td><td><pre>  pdbig<span class="token operator">=</span>list<span class="token punctuation">(</span><span class="token punctuation">)</span></pre></td></tr><tr><td data-num="153"></td><td><pre>  pdbig<span class="token operator">$</span>tip.label<span class="token operator">=</span>read.table<span class="token punctuation">(</span><span class="token string">"pd.taxon.name.csv"</span><span class="token punctuation">,</span> sep <span class="token operator">=</span> <span class="token string">","</span><span class="token punctuation">,</span> row.names <span class="token operator">=</span> <span class="token number">1</span><span class="token punctuation">,</span> header <span class="token operator">=</span> <span class="token boolean">TRUE</span><span class="token punctuation">,</span> stringsAsFactors <span class="token operator">=</span> <span class="token boolean">FALSE</span><span class="token punctuation">,</span> as.is <span class="token operator">=</span> <span class="token boolean">TRUE</span><span class="token punctuation">)</span><span class="token punctuation">[</span><span class="token punctuation">,</span><span class="token number">1</span><span class="token punctuation">]</span></pre></td></tr><tr><td data-num="154"></td><td><pre>  pdbig<span class="token operator">$</span>pd.wd<span class="token operator">=</span>wd.pd</pre></td></tr><tr><td data-num="155"></td><td><pre>  pdbig<span class="token operator">$</span>pd.file<span class="token operator">=</span><span class="token string">"pd.desc"</span></pre></td></tr><tr><td data-num="156"></td><td><pre>  pdbig<span class="token operator">$</span>pd.name.file<span class="token operator">=</span><span class="token string">"pd.taxon.name.csv"</span></pre></td></tr><tr><td data-num="157"></td><td><pre><span class="token punctuation">&#125;</span><span class="token keyword">else</span><span class="token punctuation">&#123;</span></pre></td></tr><tr><td data-num="158"></td><td><pre>  pdbig<span class="token operator">=</span>iCAMP<span class="token operator">::</span>pdist.big<span class="token punctuation">(</span>tree <span class="token operator">=</span> tree<span class="token punctuation">,</span> wd <span class="token operator">=</span> wd.pd<span class="token punctuation">,</span> nworker <span class="token operator">=</span> nworker<span class="token punctuation">)</span></pre></td></tr><tr><td data-num="159"></td><td><pre><span class="token punctuation">&#125;</span></pre></td></tr><tr><td data-num="160"></td><td><pre></pre></td></tr><tr><td data-num="161"></td><td><pre><span class="token comment"># Step 6.2 calculate pNST</span></pre></td></tr><tr><td data-num="162"></td><td><pre></pre></td></tr><tr><td data-num="163"></td><td><pre><span class="token comment"># to count time cost</span></pre></td></tr><tr><td data-num="164"></td><td><pre>t1<span class="token operator">=</span>Sys.time<span class="token punctuation">(</span><span class="token punctuation">)</span></pre></td></tr><tr><td data-num="165"></td><td><pre></pre></td></tr><tr><td data-num="166"></td><td><pre>setwd<span class="token punctuation">(</span>save.wd<span class="token punctuation">)</span></pre></td></tr><tr><td data-num="167"></td><td><pre></pre></td></tr><tr><td data-num="168"></td><td><pre>pnst<span class="token operator">=</span>NST<span class="token operator">::</span>pNST<span class="token punctuation">(</span>comm<span class="token operator">=</span>comm<span class="token punctuation">,</span> pd.desc<span class="token operator">=</span>pdbig<span class="token operator">$</span>pd.file<span class="token punctuation">,</span> pd.wd<span class="token operator">=</span>pdbig<span class="token operator">$</span>pd.wd<span class="token punctuation">,</span></pre></td></tr><tr><td data-num="169"></td><td><pre>pd.spname<span class="token operator">=</span>pdbig<span class="token operator">$</span>tip.label<span class="token punctuation">,</span> group<span class="token operator">=</span>groupi<span class="token punctuation">,</span> meta.group<span class="token operator">=</span>meta.groupi<span class="token punctuation">,</span> abundance.weighted<span class="token operator">=</span><span class="token boolean">TRUE</span><span class="token punctuation">,</span> rand<span class="token operator">=</span>rand.time<span class="token punctuation">,</span> output.rand<span class="token operator">=</span><span class="token boolean">TRUE</span><span class="token punctuation">,</span> taxo.null.model<span class="token operator">=</span><span class="token keyword">NULL</span><span class="token punctuation">,</span> phylo.shuffle<span class="token operator">=</span><span class="token boolean">TRUE</span><span class="token punctuation">,</span> exclude.conspecifics<span class="token operator">=</span><span class="token boolean">FALSE</span><span class="token punctuation">,</span> nworker<span class="token operator">=</span>nworker<span class="token punctuation">,</span> between.group<span class="token operator">=</span><span class="token boolean">FALSE</span><span class="token punctuation">,</span> SES<span class="token operator">=</span><span class="token boolean">TRUE</span><span class="token punctuation">,</span> RC<span class="token operator">=</span><span class="token boolean">TRUE</span><span class="token punctuation">)</span></pre></td></tr><tr><td data-num="170"></td><td><pre></pre></td></tr><tr><td data-num="171"></td><td><pre><span class="token comment"># save pNST output in R data format</span></pre></td></tr><tr><td data-num="172"></td><td><pre>save<span class="token punctuation">(</span>pnst<span class="token punctuation">,</span>file <span class="token operator">=</span> paste0<span class="token punctuation">(</span>prefixi<span class="token punctuation">,</span><span class="token string">".pNST.rda"</span><span class="token punctuation">)</span><span class="token punctuation">)</span></pre></td></tr><tr><td data-num="173"></td><td><pre></pre></td></tr><tr><td data-num="174"></td><td><pre>write.table<span class="token punctuation">(</span>pnst<span class="token operator">$</span>index.grp<span class="token punctuation">,</span>file <span class="token operator">=</span> paste0<span class="token punctuation">(</span>prefixi<span class="token punctuation">,</span><span class="token string">".pNST.summary.csv"</span><span class="token punctuation">)</span><span class="token punctuation">,</span> quote <span class="token operator">=</span> <span class="token boolean">FALSE</span><span class="token punctuation">,</span>sep <span class="token operator">=</span> <span class="token string">"\t"</span><span class="token punctuation">)</span></pre></td></tr><tr><td data-num="175"></td><td><pre></pre></td></tr><tr><td data-num="176"></td><td><pre>write.table<span class="token punctuation">(</span>pnst<span class="token operator">$</span>index.pair.grp<span class="token punctuation">,</span>file <span class="token operator">=</span> paste0<span class="token punctuation">(</span>prefixi<span class="token punctuation">,</span><span class="token string">".pNST.pairwise.csv"</span><span class="token punctuation">)</span><span class="token punctuation">,</span>quote <span class="token operator">=</span> <span class="token boolean">FALSE</span><span class="token punctuation">,</span>sep <span class="token operator">=</span> <span class="token string">"\t"</span><span class="token punctuation">)</span></pre></td></tr><tr><td data-num="177"></td><td><pre></pre></td></tr><tr><td data-num="178"></td><td><pre>write.table<span class="token punctuation">(</span>pnst<span class="token operator">$</span>index.pair<span class="token punctuation">,</span>file <span class="token operator">=</span> paste0<span class="token punctuation">(</span>prefixi<span class="token punctuation">,</span><span class="token string">".pNST.pairwise.index.csv"</span><span class="token punctuation">)</span><span class="token punctuation">,</span>quote <span class="token operator">=</span> <span class="token boolean">FALSE</span><span class="token punctuation">,</span>sep <span class="token operator">=</span> <span class="token string">"\t"</span><span class="token punctuation">)</span></pre></td></tr><tr><td data-num="179"></td><td><pre></pre></td></tr><tr><td data-num="180"></td><td><pre>write.table<span class="token punctuation">(</span>pnst<span class="token operator">$</span>index.between<span class="token punctuation">,</span>file <span class="token operator">=</span> paste0<span class="token punctuation">(</span>prefixi<span class="token punctuation">,</span><span class="token string">".pNST.between.summary.csv"</span><span class="token punctuation">)</span><span class="token punctuation">,</span>quote <span class="token operator">=</span> <span class="token boolean">FALSE</span><span class="token punctuation">,</span>sep <span class="token operator">=</span> <span class="token string">"\t"</span><span class="token punctuation">)</span></pre></td></tr><tr><td data-num="181"></td><td><pre></pre></td></tr><tr><td data-num="182"></td><td><pre>write.table<span class="token punctuation">(</span>pnst<span class="token operator">$</span>index.pair.between<span class="token punctuation">,</span>file <span class="token operator">=</span> paste0<span class="token punctuation">(</span>prefixi<span class="token punctuation">,</span><span class="token string">".pNST.pairwise.between.csv"</span><span class="token punctuation">)</span><span class="token punctuation">,</span>quote <span class="token operator">=</span> <span class="token boolean">FALSE</span><span class="token punctuation">,</span>sep <span class="token operator">=</span> <span class="token string">"\t"</span><span class="token punctuation">)</span></pre></td></tr><tr><td data-num="183"></td><td><pre></pre></td></tr><tr><td data-num="184"></td><td><pre>format<span class="token punctuation">(</span>Sys.time<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator">-</span>t1<span class="token punctuation">)</span></pre></td></tr><tr><td data-num="185"></td><td><pre></pre></td></tr><tr><td data-num="186"></td><td><pre><span class="token comment"># Step 6.3 Bootstrapping test</span></pre></td></tr><tr><td data-num="187"></td><td><pre></pre></td></tr><tr><td data-num="188"></td><td><pre>t1<span class="token operator">=</span>Sys.time<span class="token punctuation">(</span><span class="token punctuation">)</span></pre></td></tr><tr><td data-num="189"></td><td><pre></pre></td></tr><tr><td data-num="190"></td><td><pre>pnstbt<span class="token operator">=</span>nst.boot<span class="token punctuation">(</span>nst.result<span class="token operator">=</span>pnst<span class="token punctuation">,</span> group<span class="token operator">=</span>groupi<span class="token punctuation">,</span> rand<span class="token operator">=</span>rand.time<span class="token punctuation">,</span> trace<span class="token operator">=</span><span class="token boolean">TRUE</span><span class="token punctuation">,</span> two.tail<span class="token operator">=</span><span class="token boolean">FALSE</span><span class="token punctuation">,</span> out.detail<span class="token operator">=</span><span class="token boolean">TRUE</span><span class="token punctuation">,</span> between.group<span class="token operator">=</span><span class="token boolean">FALSE</span><span class="token punctuation">,</span> nworker<span class="token operator">=</span>nworker<span class="token punctuation">)</span></pre></td></tr><tr><td data-num="191"></td><td><pre></pre></td></tr><tr><td data-num="192"></td><td><pre>save<span class="token punctuation">(</span>pnstbt<span class="token punctuation">,</span>file <span class="token operator">=</span> paste0<span class="token punctuation">(</span>prefixi<span class="token punctuation">,</span><span class="token string">".pNST.boot.rda"</span><span class="token punctuation">)</span><span class="token punctuation">)</span></pre></td></tr><tr><td data-num="193"></td><td><pre></pre></td></tr><tr><td data-num="194"></td><td><pre>write.table<span class="token punctuation">(</span>pnstbt<span class="token operator">$</span>summary<span class="token punctuation">,</span>file <span class="token operator">=</span> paste0<span class="token punctuation">(</span>prefixi<span class="token punctuation">,</span><span class="token string">".pNST.boot.summary.csv"</span><span class="token punctuation">)</span><span class="token punctuation">,</span> quote <span class="token operator">=</span> <span class="token boolean">FALSE</span><span class="token punctuation">,</span>sep <span class="token operator">=</span> <span class="token string">"\t"</span><span class="token punctuation">)</span></pre></td></tr><tr><td data-num="195"></td><td><pre></pre></td></tr><tr><td data-num="196"></td><td><pre>write.table<span class="token punctuation">(</span>pnstbt<span class="token operator">$</span>compare<span class="token punctuation">,</span>file <span class="token operator">=</span> paste0<span class="token punctuation">(</span>prefixi<span class="token punctuation">,</span><span class="token string">".pNST.boot.compare.csv"</span><span class="token punctuation">)</span><span class="token punctuation">,</span> quote <span class="token operator">=</span> <span class="token boolean">FALSE</span><span class="token punctuation">,</span>sep <span class="token operator">=</span> <span class="token string">"\t"</span><span class="token punctuation">)</span></pre></td></tr><tr><td data-num="197"></td><td><pre></pre></td></tr><tr><td data-num="198"></td><td><pre><span class="token punctuation">(</span>t<span class="token operator">=</span>format<span class="token punctuation">(</span>Sys.time<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator">-</span>t1<span class="token punctuation">)</span><span class="token punctuation">)</span></pre></td></tr><tr><td data-num="199"></td><td><pre></pre></td></tr><tr><td data-num="200"></td><td><pre><span class="token comment"># Step 6.4 PERMANOVA</span></pre></td></tr><tr><td data-num="201"></td><td><pre></pre></td></tr><tr><td data-num="202"></td><td><pre>t1<span class="token operator">=</span>Sys.time<span class="token punctuation">(</span><span class="token punctuation">)</span></pre></td></tr><tr><td data-num="203"></td><td><pre></pre></td></tr><tr><td data-num="204"></td><td><pre>pnstpaov<span class="token operator">=</span>nst.panova<span class="token punctuation">(</span>nst.result<span class="token operator">=</span>pnst<span class="token punctuation">,</span> group <span class="token operator">=</span> groupi<span class="token punctuation">,</span> rand <span class="token operator">=</span> rand.time<span class="token punctuation">,</span> trace <span class="token operator">=</span> <span class="token boolean">TRUE</span><span class="token punctuation">)</span></pre></td></tr><tr><td data-num="205"></td><td><pre></pre></td></tr><tr><td data-num="206"></td><td><pre>write.table<span class="token punctuation">(</span>pnstpaov<span class="token punctuation">,</span>file <span class="token operator">=</span> paste0<span class="token punctuation">(</span>prefixi<span class="token punctuation">,</span><span class="token string">".pNST.PERMANOVA.csv"</span><span class="token punctuation">)</span><span class="token punctuation">,</span> quote <span class="token operator">=</span> <span class="token boolean">FALSE</span><span class="token punctuation">,</span>sep <span class="token operator">=</span> <span class="token string">"\t"</span><span class="token punctuation">)</span></pre></td></tr><tr><td data-num="207"></td><td><pre></pre></td></tr><tr><td data-num="208"></td><td><pre><span class="token punctuation">(</span>t<span class="token operator">=</span>format<span class="token punctuation">(</span>Sys.time<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator">-</span>t1<span class="token punctuation">)</span><span class="token punctuation">)</span></pre></td></tr></table></figure><h1 id="font-colorff0000-4-结果解读font"><a class="anchor" href="#font-colorff0000-4-结果解读font">#</a> <font color="#FF0000">4. 结果解读</font></h1><h2 id="font-colorff0000-41-确定性过程和随机性过程的相对重要性font"><a class="anchor" href="#font-colorff0000-41-确定性过程和随机性过程的相对重要性font">#</a> <font color="#FF0000">4.1 确定性过程和随机性过程的相对重要性</font></h2><ul><li><p>An index, normalized stochasticity ratio (NST), was developed with 50% as the boundary point between more deterministic (&lt;50%) and more stochastic (&gt;50%) assembly. <font color="#2196F3">NST &gt; 50% 时 Stochastic Processes 占主导，而 NST &lt; 50% 时，Deterministic Processes 占主导。</font></p></li><li><p>用显著的偏差 (即 |β NTI|&gt; 2) 来表示确定性过程占主导地位和用小的偏差 (即 |β NTI| &lt; 2) 来表明随机过程占主导地位。用显著的偏差 (即 |β NTI| &gt; 2) 来表示确定性过程占主导地位和用小的偏差 (即 |β NTI| &lt; 2) 来表明随机过程占主导地位。同质性和变异性选择应分别造成小于和大于预期的群落更替；βNTI &lt;−2 或 &gt; + 2 进一步解释为表明同质性或变异性选择分别占主导地位；</p></li></ul><h2 id="font-colorff0000-42-通过rcbray判断随机过程中各种过程的贡献font"><a class="anchor" href="#font-colorff0000-42-通过rcbray判断随机过程中各种过程的贡献font">#</a> <font color="#FF0000">4.2 通过 RCbray 判断随机过程中各种过程的贡献</font></h2><p>Modified Raup-Crick index (RCbray) is subsequently calculated by comparing empirically observed Bray-Curtis and simulated null distribution. Thus, according to themodified Raup-Crick index (RCbray), stochastic processes could be classified into 3 ecological processes: 均质分散 homogenizing dispersal (RCbray &lt; −0.95), 分散限制 dispersal limitation (RCbray &gt; +0.95) and 生态漂变 ecological drift (−0.95&lt; RCbray &lt; +0.95) <span class="exturl" data-url="aHR0cHM6Ly9kb2kub3JnLzEwLjEwMzgvaXNtZWouMjAxMi4yMg==">Stegen et al., 2012</span>; <span class="exturl" data-url="aHR0cHM6Ly9kb2kub3JnLzEwLjEwMzgvaXNtZWouMjAxMy45Mw==">Stegen et al., 2013</span>.</p><div class="tags"><a href="/tags/%E6%89%A9%E5%A2%9E%E5%AD%90/" rel="tag"><i class="ic i-tag"></i> 扩增子</a></div></div><footer><div class="meta"><span class="item"><span class="icon"><i class="ic i-calendar-check"></i> </span><span class="text">Edited on</span> <time title="Modified: 2022-05-31 09:41:33" itemprop="dateModified" datetime="2022-05-31T09:41:33+08:00">2022-05-31</time> </span><span id="post/1755.html" class="item leancloud_visitors" data-flag-title="扩增子分析--计算随机过程和决定性过程比例" title="Views"><span class="icon"><i class="ic i-eye"></i> </span><span class="text">Views</span> <span class="leancloud-visitors-count"></span> <span class="text">times</span></span></div><div class="reward"><button><i class="ic i-heartbeat"></i> Donate</button><p>Give me a cup of [coffee]~(￣▽￣)~*</p><div id="qr"><div><img data-src="/images/reward-wepays.jpg" alt="Hualin Liu WeChat Pay"><p>WeChat Pay</p></div><div><img data-src="/images/AliPays.jpg" alt="Hualin Liu Alipay"><p>Alipay</p></div></div></div><div id="copyright"><ul><li class="author"><strong>Post author: </strong>Hualin Liu <i class="ic i-at"><em>@</em></i>了尘兰若的小坑</li><li class="link"><strong>Post link: </strong><a href="https://liaochenlanruo.gitee.io/post/1755.html" title="扩增子分析--计算随机过程和决定性过程比例">https://liaochenlanruo.gitee.io/post/1755.html</a></li><li class="license"><strong>Copyright Notice: </strong>All articles in this blog are licensed under <span class="exturl" data-url="aHR0cHM6Ly9jcmVhdGl2ZWNvbW1vbnMub3JnL2xpY2Vuc2VzL2J5LW5jLXNhLzQuMC9kZWVkLnpo"><i class="ic i-creative-commons"><em>(CC)</em></i>BY-NC-SA</span> unless stating additionally.</li></ul></div></footer></article></div><div class="post-nav"><div class="item left"><a href="/post/4cf4.html" itemprop="url" rel="prev" data-background-image="https:&#x2F;&#x2F;fastly.jsdelivr.net&#x2F;gh&#x2F;liaochenlanruo&#x2F;cdn@master&#x2F;img&#x2F;custom&#x2F;bgs&#x2F;thumb_68.webp" title="Use microeco分析扩增子数据"><span class="type">Previous Post</span> <span class="category"><i class="ic i-flag"></i> 生物信息</span><h3>Use microeco分析扩增子数据</h3></a></div><div class="item right"><a href="/post/89e8.html" itemprop="url" rel="next" data-background-image="https:&#x2F;&#x2F;fastly.jsdelivr.net&#x2F;gh&#x2F;liaochenlanruo&#x2F;cdn@master&#x2F;img&#x2F;custom&#x2F;bgs&#x2F;thumb_52.webp" title="Bioinformatics投稿经验"><span class="type">Next Post</span> <span class="category"><i class="ic i-flag"></i> 投稿</span><h3>Bioinformatics投稿经验</h3></a></div></div><div class="wrap" id="comments"></div></div><div id="sidebar"><div class="inner"><div class="panels"><div class="inner"><div class="contents panel pjax" data-title="Contents"><ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#font-colorff0000-1-%E8%BD%AF%E4%BB%B6font"><span class="toc-number">1.</span> <span class="toc-text">1. 软件</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#font-colorff0000-2-%E6%96%87%E4%BB%B6%E5%87%86%E5%A4%87font"><span class="toc-number">2.</span> <span class="toc-text">2. 文件准备</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#font-colorff0000-21-feature-tablefont"><span class="toc-number">2.1.</span> <span class="toc-text">2.1 Feature Table</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#font-colorff0000-22-group-filefont"><span class="toc-number">2.2.</span> <span class="toc-text">2.2 Group File</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#font-colorff0000-23-tree-filefont"><span class="toc-number">2.3.</span> <span class="toc-text">2.3 Tree File</span></a></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#font-colorff0000-3-%E5%BC%80%E5%A7%8B%E5%88%86%E6%9E%90font"><span class="toc-number">3.</span> <span class="toc-text">3. 开始分析</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#font-colorff0000-4-%E7%BB%93%E6%9E%9C%E8%A7%A3%E8%AF%BBfont"><span class="toc-number">4.</span> <span class="toc-text">4. 结果解读</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#font-colorff0000-41-%E7%A1%AE%E5%AE%9A%E6%80%A7%E8%BF%87%E7%A8%8B%E5%92%8C%E9%9A%8F%E6%9C%BA%E6%80%A7%E8%BF%87%E7%A8%8B%E7%9A%84%E7%9B%B8%E5%AF%B9%E9%87%8D%E8%A6%81%E6%80%A7font"><span class="toc-number">4.1.</span> <span class="toc-text">4.1 确定性过程和随机性过程的相对重要性</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#font-colorff0000-42-%E9%80%9A%E8%BF%87rcbray%E5%88%A4%E6%96%AD%E9%9A%8F%E6%9C%BA%E8%BF%87%E7%A8%8B%E4%B8%AD%E5%90%84%E7%A7%8D%E8%BF%87%E7%A8%8B%E7%9A%84%E8%B4%A1%E7%8C%AEfont"><span class="toc-number">4.2.</span> <span class="toc-text">4.2 通过 RCbray 判断随机过程中各种过程的贡献</span></a></li></ol></li></ol></div><div class="related panel pjax" data-title="Related"><ul><li><a href="/post/19824.html" rel="bookmark" title="生物信息学1：VMware虚拟机及Bio-linux安装与配置">生物信息学1：VMware虚拟机及Bio-linux安装与配置</a></li><li><a href="/post/9.html" rel="bookmark" title="生物信息学2：VirtualBox虚拟机及Bio-Linux安装">生物信息学2：VirtualBox虚拟机及Bio-Linux安装</a></li><li><a href="/post/10877.html" rel="bookmark" title="生物信息学3：微生物基因组学常用软件安装">生物信息学3：微生物基因组学常用软件安装</a></li><li><a href="/post/30650.html" rel="bookmark" title="根据基因组预测表型 —— traitar的安装与使用">根据基因组预测表型 —— traitar的安装与使用</a></li><li><a href="/post/44606.html" rel="bookmark" title="kSNP3寻找SNPs并构建进化树">kSNP3寻找SNPs并构建进化树</a></li><li><a href="/post/43504.html" rel="bookmark" title="用wget批量下载含有链接的文件/目录">用wget批量下载含有链接的文件/目录</a></li><li><a href="/post/94f2.html" rel="bookmark" title="为PubMed添加功能">为PubMed添加功能</a></li><li><a href="/post/4e1.html" rel="bookmark" title="OrthoFinder2—同源蛋白家族聚类">OrthoFinder2—同源蛋白家族聚类</a></li><li><a href="/post/848f.html" rel="bookmark" title="PGCGAP中文说明">PGCGAP中文说明</a></li><li><a href="/post/d163.html" rel="bookmark" title="Bioconda贡献指南">Bioconda贡献指南</a></li><li><a href="/post/f6c9.html" rel="bookmark" title="Linux和基因组测序技术初识">Linux和基因组测序技术初识</a></li><li><a href="/post/5908.html" rel="bookmark" title="BtToxin_Digger--A high-throughput Bacillus thuringiensis toxin mining pipeline">BtToxin_Digger--A high-throughput Bacillus thuringiensis toxin mining pipeline</a></li><li><a href="/post/ab1b.html" rel="bookmark" title="宏基因组分析流程及代码">宏基因组分析流程及代码</a></li><li><a href="/post/4cf4.html" rel="bookmark" title="Use microeco分析扩增子数据">Use microeco分析扩增子数据</a></li><li class="active"><a href="/post/1755.html" rel="bookmark" title="扩增子分析--计算随机过程和决定性过程比例">扩增子分析--计算随机过程和决定性过程比例</a></li><li><a href="/post/e7e9.html" rel="bookmark" title="根据assession number批量从NCB下载数据">根据assession number批量从NCB下载数据</a></li><li><a href="/post/e922.html" rel="bookmark" title="Swissprot数据库的本地化与序列比对并与其他数据库快速mapping">Swissprot数据库的本地化与序列比对并与其他数据库快速mapping</a></li><li><a href="/post/412a.html" rel="bookmark" title="构建样本vs基因矩阵">构建样本vs基因矩阵</a></li><li><a href="/post/9052.html" rel="bookmark" title="CAZy碳水化合物活性酶预测">CAZy碳水化合物活性酶预测</a></li><li><a href="/post/5324.html" rel="bookmark" title="原核生物基因岛预测">原核生物基因岛预测</a></li><li><a href="/post/d9f9.html" rel="bookmark" title="按照Contig切割GenBank文件">按照Contig切割GenBank文件</a></li><li><a href="/post/3a23.html" rel="bookmark" title="从GenBank文件中提取Features">从GenBank文件中提取Features</a></li><li><a href="/post/fb68.html" rel="bookmark" title="使用EffectiveT3预测微生物中的III型分泌系统效应蛋白">使用EffectiveT3预测微生物中的III型分泌系统效应蛋白</a></li><li><a href="/post/c886.html" rel="bookmark" title="SignalP+TMHMM预测微生物分泌蛋白">SignalP+TMHMM预测微生物分泌蛋白</a></li><li><a href="/post/6a93.html" rel="bookmark" title="在FASTA文件中搜索完全匹配的短序列">在FASTA文件中搜索完全匹配的短序列</a></li><li><a href="/post/ea71.html" rel="bookmark" title="在Linux服务器中安装网页版Rstudio">在Linux服务器中安装网页版Rstudio</a></li><li><a href="/post/a713.html" rel="bookmark" title="R语言安装依赖包错误集锦">R语言安装依赖包错误集锦</a></li><li><a href="/post/d444.html" rel="bookmark" title="NCBI上传基因簇之tbl2asn的使用">NCBI上传基因簇之tbl2asn的使用</a></li><li><a href="/post/18ea.html" rel="bookmark" title="利用NCycDB数据库从宏基因组中预测氮循环基因">利用NCycDB数据库从宏基因组中预测氮循环基因</a></li><li><a href="/post/36cc.html" rel="bookmark" title="R语言绘制分组条形图">R语言绘制分组条形图</a></li><li><a href="/post/1551.html" rel="bookmark" title="宏病毒组分析流程1-VirSorter2">宏病毒组分析流程1-VirSorter2</a></li><li><a href="/post/8fb3.html" rel="bookmark" title="利用GTDB-TK对细菌和古菌基因组进行物种分类">利用GTDB-TK对细菌和古菌基因组进行物种分类</a></li><li><a href="/post/85d7.html" rel="bookmark" title="计算蛋白质等电点并绘制全局pI图">计算蛋白质等电点并绘制全局pI图</a></li><li><a href="/post/92eb.html" rel="bookmark" title="使用DeepARG预测抗生素抗性基因ARGs">使用DeepARG预测抗生素抗性基因ARGs</a></li><li><a href="/post/74ad.html" rel="bookmark" title="Nanopore基因组组装">Nanopore基因组组装</a></li><li><a href="/post/2581.html" rel="bookmark" title="使用eggNOG-mapper注释基因组">使用eggNOG-mapper注释基因组</a></li><li><a href="/post/d862.html" rel="bookmark" title="PGCGAP - the Prokaryotic Genomics and Comparative Genomics Analysis Pipeline v1.0.33">PGCGAP - the Prokaryotic Genomics and Comparative Genomics Analysis Pipeline v1.0.33</a></li><li><a href="/post/e6ae.html" rel="bookmark" title="利用PGCGAP根据ids提取序列信息">利用PGCGAP根据ids提取序列信息</a></li><li><a href="/post/213.html" rel="bookmark" title="多种方法批量下载NCBI基因组">多种方法批量下载NCBI基因组</a></li><li><a href="/post/33b.html" rel="bookmark" title="代谢组相关软件的安装及使用">代谢组相关软件的安装及使用</a></li><li><a href="/post/377e.html" rel="bookmark" title="使用xcms3处理和分析LC-MS数据">使用xcms3处理和分析LC-MS数据</a></li><li><a href="/post/df57.html" rel="bookmark" title="用metid构建代谢组数据库">用metid构建代谢组数据库</a></li><li><a href="/post/0.html" rel="bookmark" title="基于TidyMass的非靶向代谢组学分析">基于TidyMass的非靶向代谢组学分析</a></li><li><a href="/post/29bf.html" rel="bookmark" title="批量下载某研究方向重要文献">批量下载某研究方向重要文献</a></li><li><a href="/post/c617.html" rel="bookmark" title="16S扩增子测序及宏基因组测序">16S扩增子测序及宏基因组测序</a></li><li><a href="/post/1177.html" rel="bookmark" title="用MaAsLin2包做微生物组多变量线性模型关联分析">用MaAsLin2包做微生物组多变量线性模型关联分析</a></li><li><a href="/post/7449.html" rel="bookmark" title="NCBI上传基因簇之table2asn的使用">NCBI上传基因簇之table2asn的使用</a></li></ul></div><div class="overview panel" data-title="Overview"><div class="author" itemprop="author" itemscope itemtype="http://schema.org/Person"><img class="image" itemprop="image" alt="Hualin Liu" data-src="/images/head.jpg"><p class="name" itemprop="name">Hualin Liu</p><div class="description" itemprop="description">分享微生物生物信息学分析方法，欢迎加入QQ群交流945751012，不接受群内广告！</div></div><nav class="state"><div class="item posts"><a href="/archives/"><span class="count">130</span> <span class="name">posts</span></a></div><div class="item categories"><a href="/categories/"><span class="count">12</span> <span class="name">categories</span></a></div><div class="item tags"><a href="/tags/"><span class="count">54</span> <span class="name">tags</span></a></div></nav><div class="social"><span class="exturl item github" data-url="aHR0cDovL2dpdGh1Yi5jb20vbGlhb2NoZW5sYW5ydW8=" title="http:&#x2F;&#x2F;github.com&#x2F;liaochenlanruo"><i class="ic i-github"></i></span> <span class="exturl item zhihu" data-url="aHR0cHM6Ly93d3cuemhpaHUuY29tL3Blb3BsZS9zdWFuLWxhLW1pYW4tcGlhbi10YW5nLWNpdW0=" title="https:&#x2F;&#x2F;www.zhihu.com&#x2F;people&#x2F;suan-la-mian-pian-tang-cium"><i class="ic i-zhihu"></i></span> <span class="exturl item weibo" data-url="aHR0cHM6Ly93ZWliby5jb20vdS8yNzE1MjEwOTIz" title="https:&#x2F;&#x2F;weibo.com&#x2F;u&#x2F;2715210923"><i class="ic i-weibo"></i></span> <span class="exturl item about" data-url="aHR0cHM6Ly93d3cubGlhb2NoZW5sYW5ydW8uZnVuL2Fib3V0" title="https:&#x2F;&#x2F;www.liaochenlanruo.fun&#x2F;about"><i class="ic i-address-card"></i></span> <span class="exturl item email" data-url="bWFpbHRvOmxpYW9jaGVubGFucnVvQHdlYm1haWwuaHphdS5lZHUuY24=" title="mailto:liaochenlanruo@webmail.hzau.edu.cn"><i class="ic i-envelope"></i></span> <span class="exturl item douban" data-url="aHR0cHM6Ly93d3cuZG91YmFuLmNvbS9wZW9wbGUvbGlhb2NoZW5sYW5ydW8vP19pPTczNDYxMjVRalo1QjZWLw==" title="https:&#x2F;&#x2F;www.douban.com&#x2F;people&#x2F;liaochenlanruo&#x2F;?_i&#x3D;7346125QjZ5B6V&#x2F;"><i class="ic i-douban"></i></span> <span class="exturl item google" data-url="aHR0cHM6Ly9zY2hvbGFyLmdvb2dsZS5jby5qcC9jaXRhdGlvbnM/dXNlcj1YYW9STk1RQUFBQUomaGw9amE=" title="https:&#x2F;&#x2F;scholar.google.co.jp&#x2F;citations?user&#x3D;XaoRNMQAAAAJ&amp;hl&#x3D;ja"><i class="ic i-google"></i></span></div><ul class="menu"><li class="item"><a href="/" rel="section"><i class="ic i-home"></i>Home</a></li><li class="item dropdown"><a href="javascript:void(0);"><i class="ic i-user"></i>About</a><ul class="submenu"><li class="item"><a href="/about/" rel="section"><i class="ic i-user"></i>About me</a></li><li class="item"><a href="/comment/" rel="section"><i class="ic i-envelope"></i>Comment</a></li></ul></li><li class="item dropdown"><a href="javascript:void(0);"><i class="ic i-feather"></i>Posts</a><ul class="submenu"><li class="item"><a href="/archives/" rel="section"><i class="ic i-list-alt"></i>Archives</a></li><li class="item"><a href="/categories/" rel="section"><i class="ic i-th"></i>Categories</a></li><li class="item"><a href="/tags/" rel="section"><i class="ic i-tags"></i>Tags</a></li></ul></li><li class="item dropdown"><a href="javascript:void(0);"><i class="ic i-list-ol"></i>List</a><ul class="submenu"><li class="item"><a href="/photos/" rel="section"><i class="ic i-person"></i>Photos</a></li><li class="item"><a href="/skip/gallery/" rel="section"><i class="ic i-cloud"></i>Gallery</a></li><li class="item"><a href="/skip/box/" rel="section"><i class="ic i-magic"></i>Box</a></li><li class="item"><span class="exturl" data-url="aHR0cHM6Ly9saWFvY2hlbmxhbnJ1by5mdW4vcmVmZXJlbmNlLw=="><i class="ic i-th"></i>cheatsheets</span></li></ul></li><li class="item"><a href="/donate/" rel="section"><i class="ic i-coffee"></i>Donate</a></li><li class="item"><a href="/friends/" rel="section"><i class="ic i-heart"></i>Friends</a></li><li class="item"><span class="exturl" data-url="aHR0cHM6Ly9saWFvY2hlbmxhbnJ1by5naXRodWIuaW8="><i class="ic i-external-link-alt"></i>中文版</span></li><li class="item"><span class="exturl" data-url="aHR0cHM6Ly90cmF2ZWxsaW5ncy5saW5r"><i class="ic i-forward"></i>Travelling</span></li></ul></div></div></div><ul id="quick"><li class="prev pjax"><a href="/post/4cf4.html" rel="prev" title="Previous Post"><i class="ic i-chevron-left"></i></a></li><li class="up"><i class="ic i-arrow-up"></i></li><li class="down"><i class="ic i-arrow-down"></i></li><li class="next pjax"><a href="/post/89e8.html" rel="next" title="Next Post"><i class="ic i-chevron-right"></i></a></li><li class="percent"></li></ul></div></div><div class="dimmer"></div></div></main><footer id="footer"><div class="inner"><div class="widgets"></div><div class="status"><div class="copyright">&copy; 2018 – <span itemprop="copyrightYear">2024</span> <span class="with-love"><i class="ic i-sakura rotate"></i> </span><span class="author" itemprop="copyrightHolder">Hualin Liu @ ResearchGo</span></div><div class="count"><span class="post-meta-item-icon"><i class="ic i-chart-area"></i> </span><span title="Symbols count total">788k words</span> <span class="post-meta-divider">|</span> <span class="post-meta-item-icon"><i class="ic i-coffee"></i> </span><span title="Reading time total">11:57</span><script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script><span class="post-meta-divider">|</span> <span class="post-meta-item-icon"><i class="ic i-info-circle"></i> </span><span style="padding-left:1px"><span id="busuanzi_container_site_pv">Total visits: <span id="busuanzi_value_site_pv" style="color:#f99"></span> times</span> <span class="post-meta-divider">|</span> <span class="post-meta-item-icon"><i class="ic i-user"></i> </span><span style="padding-left:1px"><span id="busuanzi_container_site_uv">Total visitors: <span id="busuanzi_value_site_uv" style="color:#f99"></span> people</span></span></span></div><div class="powered-by">Powered by <span class="exturl" data-url="aHR0cHM6Ly9oZXhvLmlv">Hexo</span> & Theme.<span class="exturl" data-url="aHR0cHM6Ly9naXRodWIuY29tL2FtZWhpbWUvaGV4by10aGVtZS1zaG9rYQ==">Shoka</span></div></div></div></footer></div><script data-config type="text/javascript">var LOCAL={path:"post/1755.html",favicon:{show:"（●´3｀●）Goooood",hide:"(´Д｀)Booooom"},search:{placeholder:"Search for Posts",empty:"We didn't find any results for the search: ${query}",stats:"${hits} results found in ${time} ms"},valine:!0,fancybox:!0,copyright:'Copied to clipboard successfully! <br> All articles in this blog are licensed under <i class="ic i-creative-commons"></i>BY-NC-SA.',ignores:[function(e){return e.includes("#")},function(e){return new RegExp(LOCAL.path+"$").test(e)}]}</script><script src="https://cdn.polyfill.io/v2/polyfill.js"></script><script src="//cdn.jsdelivr.net/combine/npm/pace-js@1.0.2/pace.min.js,npm/pjax@0.2.8/pjax.min.js,npm/whatwg-fetch@3.4.0/dist/fetch.umd.min.js,npm/animejs@3.2.0/lib/anime.min.js,npm/algoliasearch@4/dist/algoliasearch-lite.umd.js,npm/instantsearch.js@4/dist/instantsearch.production.min.js,npm/lozad@1/dist/lozad.min.js,npm/quicklink@2/dist/quicklink.umd.js"></script><script src="/js/app.js?v=0.2.5"></script><script data-pjax>var _hmt=_hmt||[];!function(){var e=document.createElement("script");e.src="https://hm.baidu.com/hm.js?d211830a796ceefb38a141fde14e4d5a";var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)}()</script></body></html>